<ion-view view-title="新品赠送">
	
	<ion-content scroll="false">
		<!--轮播图-->
		<ion-slide-box does-continue="true" auto-play="true" delegate-handle="advs-handle" id="advsBox">
			<ion-slide ng-repeat="img in banners">
				<img src="{{img.image_id}}" width="100%" >
			</ion-slide>
			<!--<ion-slide>
				<img src="./img/bg-cf.png" width="100%">
			</ion-slide>
			<ion-slide>
				<img src="./img/bg-aq-img.png" width="100%">
			</ion-slide>
			<ion-slide>
				<img src="./img/bg-cg.png" width="100%">
			</ion-slide>-->
		</ion-slide-box>
		
		<div class="row top">
			<div class="col" on-tap="activeSlide(0)" ng-class="selectIndex==0?'top-activated':''">
				进行中
			</div>
			<div class="col" on-tap="activeSlide(1)" ng-class="selectIndex==1?'top-activated':''">
				即将开始
			</div>
			<div class="col" on-tap="activeSlide(2)" ng-class="selectIndex==2?'top-activated':''">
				已经结束
			</div>
			<div class="col" on-tap="activeSlide(4)" ng-class="selectIndex==4?'top-activated':''">
				已申请
			</div>
			<div class="col" on-tap="activeSlide(3)" ng-class="selectIndex==3?'top-activated':''">
				全部活动
			</div>
		</div>
		
		<ion-slide-box delegate-handle="tab-handle" on-slide-changed="slideChanged(index)" active-slide="tabIndex" show-pager="false" on-touch="onTouch()" on-release="onRelease()"> 
			<!--进行中-->
			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>

					<div class="font-large-my font-gray-my text-center padding" ng-if="doing.act.length==0||doing.act==null">
						<i class="icon ion-sad-outline font-1rem-my"></i> 对不起，没有进行中的新品赠送活动.....
					</div>
					<div class="list">
						<div class="item item-thumbnail-left" ng-repeat="act in doing.act" style="padding-bottom: 8px;" on-tap="onshow_detail(act.act_id,act.act_status,act.goods_id,act.product_id)">
							<img src="{{act.image[0].image}}" ng-if="act.image[0].image" />
							<img src="{{noImg}}" ng-if="act.image[0].image==''||act.image[0].image==null" />
							<p class="font-middle-my" on-tap="onshow_first(act.store_id,$event)"><i class="icon ion-home font-large-my font-gray-my"></i>&nbsp;<span class="positive">{{act.store_name}}</span></p>
							<div>
								<p>{{act.act_name}}</p>
								<p class="font-gray-my font-middle-my">{{act.introduction}}</p>
								<p class="font-middle-my"><i class="icon ion-ios-timer-outline font-large-my"></i>&nbsp;<span class="assertive">{{act.formate_time}}</span></p>
							</div>
						</div>
					</div>

					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>

			<!--即将开始-->
			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>

					<div class="font-large-my font-gray-my text-center padding" ng-if="will.act.length==0||will.act==null">
						<i class="icon ion-sad-outline font-1rem-my"></i> 对不起，没有即将开始的新品赠送活动.....
					</div>

					<div class="list">
						<div class="item item-thumbnail-left" ng-repeat="act in will.act" style="padding-bottom: 8px;" on-tap="onshow_detail(act.act_id,act.act_status,act.goods_id,act.product_id)" >
							<img src="{{act.image[0].image}}" ng-if="act.image[0].image" />
							<img src="{{noImg}}" ng-if="act.image[0].image==''||act.image[0].image==null"  />
							<p class="font-middle-my" on-tap="onshow_first(act.store_id,$event)"><i class="icon ion-home font-large-my font-gray-my"></i>&nbsp;<span class="positive">{{act.store_name}}</span></p>
							<div>
								<p>{{act.act_name}}</p>
								<p class="font-gray-my font-middle-my">{{act.introduction}}</p>
								<p class="font-middle-my"><i class="icon ion-ios-timer-outline font-large-my"></i>&nbsp;<span class="assertive">{{act.formate_time}}</span></p>
							</div>
						</div>
					</div>

					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>

			<!--已经结束-->
			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>

					<div class="font-large-my font-gray-my text-center padding" ng-if="ended.act.length==0||ended.act==null">
						<i class="icon ion-sad-outline font-1rem-my"></i> 对不起，没有已经结束的新品赠送活动.....
					</div>

					<div class="list">
						<div class="item item-thumbnail-left" ng-repeat="act in ended.act" style="padding-bottom: 8px;" on-tap="onshow_detail(act.act_id,act.act_status,act.goods_id,act.product_id)" >
							<img src="{{act.image[0].image}}" ng-if="act.image[0].image" />
							<img src="{{noImg}}" ng-if="act.image[0].image==''||act.image[0].image==null" />
							<p class="font-middle-my" on-tap="go_store(act.store_id,$event)"><i class="icon ion-home font-large-my font-gray-my"></i>&nbsp;<span class="positive">{{act.store_name}}</span></p>
							<div>
								<p>{{act.act_name}}</p>
								<p class="font-gray-my font-middle-my">{{act.introduction}}</p>
								<p class="font-middle-my"><i class="icon ion-ios-timer-outline font-large-my"></i>&nbsp;<span class="assertive">{{act.formate_time}}</span></p>
							</div>
						</div>
					</div>
					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>

			<!--全部-->
			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>

					<div class="font-large-my font-gray-my text-center padding" ng-if="datas.act.length==0||datas.act==null">
						<i class="icon ion-sad-outline font-1rem-my"></i> 对不起，还没有新品赠送活动.....
					</div>

					<div class="list">
						<div class="item item-thumbnail-left" ng-repeat="act in datas.act" style="padding-bottom: 8px;"  on-tap="onshow_detail(act.act_id,act.act_status,act.goods_id,act.product_id)">
							<img src="{{act.image[0].image}}" ng-if="act.image[0].image" />
							<img src="{{noImg}}" ng-if="act.image[0].image==''||act.image[0].image==null" />
							<p class="font-middle-my" on-tap="onshow_first(act.store_id,$event)"><i class="icon ion-home font-large-my font-gray-my"></i>&nbsp;<span class="positive">{{act.store_name}}</span></p>
							<div>
								<p>{{act.act_name}}</p>
								<p class="font-gray-my font-middle-my">{{act.introduction}}</p>
								<p class="font-middle-my"><i class="icon ion-ios-timer-outline font-large-my"></i>&nbsp;<span class="assertive">{{act.formate_time}}</span></p>
							</div>
						</div>
					</div>

					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>
			
			<!--已申请-->
			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>

					<div class="font-large-my font-gray-my text-center padding" ng-if="apply.act.length==0||apply.act==null">
						<i class="icon ion-sad-outline font-1rem-my"></i> 很遗憾，您还没有申请新品赠送活动.....
					</div>

					<div class="list">
						<div class="item item-thumbnail-left" ng-repeat="act in apply.act" style="padding-bottom: 8px;"  on-tap="onshow_detail(act.act_id,act.act_status,act.goods_id,act.product_id)">
							<img src="{{act.image[0].image}}" ng-if="act.image[0].image" />
							<img src="{{noImg}}" ng-if="act.image[0].image==''||act.image[0].image==null" />
							<p class="font-middle-my" on-tap="onshow_first(act.store_id,$event)"><i class="icon ion-home font-large-my font-gray-my"></i>&nbsp;<span class="positive">{{act.store_name}}</span></p>
							<div>
								<p>{{act.act_name}}</p>
								<p class="font-gray-my font-middle-my">{{act.introduction}}</p>
								<p class="font-middle-my"><i class="icon ion-ios-timer-outline font-large-my"></i>&nbsp;<span class="assertive">{{act.formate_time}}</span></p>
							</div>
						</div>
					</div>

					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>
			
		</ion-slide-box>
	</ion-content>
</ion-view>